import {DataTypes} from "sequelize";
import {sqlServerSeq} from "../../../config/sqlServerDB.js";

function createModel(tableName) {
  return sqlServerSeq.define(tableName, {
    Id: {
      type: DataTypes.INTEGER,
      primaryKey: true,
      autoIncrement: true,
    },
    StationCode: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    TimePoint: {
      type: DataTypes.DATE,
      allowNull: false,
    },
  });
}

/*const testModel = sqlServerSeq.define('testModel', {
  Id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true,
  },
  StationCode: {
    type: DataTypes.STRING,
    allowNull: false,
  },
  TimePoint: {
    type: DataTypes.DATE,
    allowNull: false,
  },
});*/

/*testModel.sync({force: false}).then((res) => {
  console.log(res);
});*/

export default createModel;


